//
//  DZDinningRoomTableViewCell.m
//  DaZhePrivateHomeCuisineClient
//
//  Created by zouzhisheng on 14-12-15.
//  Copyright (c) 2014年 zouzhisheng. All rights reserved.
//

#import "DZDinningRoomTableViewCell.h"

@implementation DZDinningRoomTableViewCell

- (void)awakeFromNib
{
    // Initialization code
    self.height=90;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)loadData:(DZSubRestautantModel *)model{
    [self.headImageView sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@/%@",API_DOMAIN,model.thumb]] placeholderImage:IMG(@"pic")];
    self.nameLabel.text=model.name;
    self.zanCountLabel.text=[NSString stringWithFormat:@"已有%@人",model.c_zan];
}
-(void)drawRect:(CGRect)rect{
    CGContextRef context = UIGraphicsGetCurrentContext();
    
    CGContextSetFillColorWithColor(context, [UIColor clearColor].CGColor);
    CGContextFillRect(context, rect);
    
    CGContextSetStrokeColorWithColor(context, [UIColor grayColor].CGColor);
    
    CGContextStrokeRect(context, CGRectMake(10, rect.size.height, rect.size.width-20, 1));
    
}

@end
